package com.dtdream.emr;

import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.hive.ql.udf.UDFType;

@UDFType(deterministic = false, stateful = false)
public final class UUIDudf extends UDF {

    public String evaluate(Object o) {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }

    public String evaluate(boolean o) {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }

    public String evaluate(int o) {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }

    public String evaluate(double o) {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }

    public String evaluate(String o) {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }

    public String evaluate() {
        java.util.UUID uuid = java.util.UUID.randomUUID();
        return uuid.toString();
    }
}

